import axios from "./axios";

// 地址管理接口定义
// 1、地址列表
export function addressListApi(data:{
    userid:string
}){
    return axios({
        method:'get',
        url:'/address/list',
        params:data
    })   
}
// 2、添加地址
export function addAddress(data:any){
    return axios({
        method:'post',
        url:'/address/add',
        data
    })   
}
// 3、更新地址
export function updateAddress(data?:any) {
    return axios({
        url: '/address/update',
        method: 'post',
        data
    })
}
// 4\查询默认地址
export function searchAddress(data?:any) {
    return axios({
        url: '/address/defaultAddress',
        method: 'post',
        data
    })
}
// 5\删除地址

export function delAddress(data?:{addressid:string}) {
    return axios({
        url: '/address/delete',
        method: 'post',
        data
    })
}
